home *** CD-ROM | disk | FTP | other *** search
/ Item MB Quick & Easy 2.0 / Item MB Quick & Easy 2.0.iso / mbfacad / eaitpro6.lsp < prev    next >
Lisp/Scheme  |  1998-03-15  |  5KB  |  111 lines

  1. ;---------Unterfunktion zur Profilzeichnung 8er-Nut
  2. ;--------------------------------------------------------------------------
  3. ; Wird neues Profil erstellt, trage die Liste mit den Punkten der Quer-    
  4. ; linien ein (siehe erstes SETQ) und füge eine entsprechende Zeile in der  
  5. ; ersten COND - Anweisung ein !!!!                                         
  6. ;                                                                          
  7. ; PROFIL muß eine String entsprechend aus erster COND- Anweisung sein      
  8. ; EPKT   ist Einfügepkt.                                                  
  9. ; LA     ist Laenge des Profils                                             
  10. ; WIN    ist Einfügewinkel                                                 
  11. ; KRI    ist Konstruktionswinkel                                           
  12. ;--------------------------------------------------------------------------
  13.  
  14. (defun EAITpro6 (PROFIL EPKT LA WIN KRI / SS1 LI LI1 LI2 LI3 LI4 LI5 LI6 LI7 LI8 LI9
  15.                                                LIN END1 WIZ N Z)
  16.                                
  17. ;--------Listen der Profil-Linien                               
  18.  
  19.        (setvar "OSMODE" 0)
  20.        (setq LI1 '(12 18 30)
  21.              LI2 '(12 18 42 48 60)
  22.              LI3 '(12 18 42 48 72 78 102 108 120)          
  23.              LI4 '(30)          
  24.              LI5 '(4 14.9)          
  25.              LI6 '(2.3 8)
  26.              LI7 '(30)         
  27.              LI8 '(30)         
  28.              LI9 '(60)         
  29.              LI10 '(3.6)
  30.              LI11 '(3)
  31.        )
  32.  
  33.        (cond ((= PROFIL "30x30")  (setq LI LI1))
  34.              ((= PROFIL "60x60")  (setq LI LI2))
  35.              ((= PROFIL "120x120")(setq LI LI3))
  36.              ((= PROFIL "30")     (setq LI LI4))
  37.              ((= PROFIL "15x8L")  (setq LI LI5))
  38.              ((= PROFIL "15x8K")  (setq LI LI6))
  39.              ((= PROFIL "30x30-45")  (setq LI LI7))
  40.              ((= PROFIL "30x30N1")  (setq LI LI8))
  41.              ((= PROFIL "60x30N2")  (setq LI LI9))
  42.              ((= PROFIL "GLEITLEISTE")  (setq LI LI10))
  43.              ((= PROFIL "ABDECKP 24x3")  (setq LI LI11))
  44.        );cond
  45.  
  46. ;---------Bedingungen fⁿr Quadranten    
  47.  
  48.        (cond ((AND (<= WIN KRI)(< KRI (+ WIN(/ Pi 2))));I. Quadrant
  49.                        (setq WIN WIN                         ;
  50.                              WIZ (+ WIN (/ Pi 2))            ; 
  51.                        )                                     ;
  52.                 )                                         ;I. Quadrant
  53.  
  54.                 ((AND (<= (+ WIN(/ Pi 2)) KRI)(< KRI (+ WIN Pi))); II. Quadrant 
  55.                        (setq WIN (+ WIN Pi)                         ;
  56.                              WIZ (- WIN (/ Pi 2))                   ;
  57.                        )                                            ;
  58.                  )                                                ; II. Quadrant
  59.  
  60.                 ((AND (<= (+ WIN Pi) KRI)(< KRI (+ WIN (/(* Pi 3)2)))); III.Quadrant
  61.                        (setq WIN (+ WIN Pi)                              ;
  62.                              WIZ (+ WIN (/ Pi 2))                        ;
  63.                        )                                                 ;
  64.                  )                                                     ; III. Quadrant
  65.                 (T                                                  ; IV. Quadrant
  66.                        (setq WIN WIN                                     ;
  67.                              WIZ (- WIN (/ Pi 2))                        ;
  68.                        )                                                 ;
  69.                 )                                                   ; IV. Quadrant
  70.        );cond            
  71.        (setq WINFO (/ (+ WIN WIZ) 2))     ;Winkel für MB-INFO - Punkt
  72.  
  73. ;-----------Zeichnen der Profil-Grundlinie    
  74.  
  75.        (command EAITlay EAITlse "EAIT50" "")
  76.        (setq END1 (polar EPKT WIN LA))    
  77.        (command EAITlin EPKT END1 "")
  78.        (setq LIN (entlast)
  79.              SS1 (ssadd (entlast))
  80.              Z -1
  81.        )    
  82.  
  83. ;-----------Zeichnen des restlichen Profils    
  84.  
  85.        (foreach N LI
  86.                (command EAITkop LIN "" EPKT (polar EPKT WIZ N))
  87.                (setq SS1 (ssadd (entlast) SS1))
  88.                (setq Z (1+ Z))
  89.        );foreach
  90.     
  91.        (command EAITlin EPKT (polar EPKT WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  92.        (setq SS1 (ssadd (entlast) SS1))
  93.        (command EAITlin END1 (polar END1 WIZ (nth Z LI)) "") ;Seiten-Linie d. Profils
  94.        (setq SS1 (ssadd (entlast) SS1))
  95.  
  96.        (if (= LI LI7)
  97.                (progn
  98.                        (command EAITlay EAITlse "EAIT25" "")
  99.                        (command EAITlin (polar EPKT WIZ 9)(polar END1 WIZ 9) "")
  100.                        (setq SS1 (ssadd (entlast) SS1))
  101.                )
  102.        )
  103.  
  104. ;-----------Block bilden    
  105.  
  106.        (setq BName (EAITbnr))
  107.        (command EAITblo BName EPKT SS1 ""
  108.                 EAITege BName EPKT "" "" "" )
  109.  
  110. );defun EAITpro6
  111.